<%@page import="${basepackage}.framework.model.*"%>
<%@ page contentType="text/html;charset=UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ include file="/commons/taglibs.jsp"%>



<title><fmt:message key="auditlog.title" /></title>

	
<script type="text/javascript">
		$(document).ready(function() {
			addDateTimePicker('.form_date'); 
			addPaginator('#pagination', <@jspEl 'page.thisPageNumber'/>,<@jspEl 'page.lastPageNumber'/>); 
		});
		

	</script>



<form id="queryForm" name="queryForm"
	action="<c:url value="/auditlog/list"/>" method="get"
	style="display: inline;">
	<fieldset>
		<legend>搜索</legend>
		<div class="form-group">

			<div class="row offset4">

				<div class="col-md-2">
					<label><fmt:message key="auditlog.action.title" /> </label>
				</div>

				<div class="col-md-3">
					<input value="<@jspEl 'query.action'/>" id="action"
						name="action" maxlength="50" class="" />
				</div>

				<div class="col-md-2">
					<label><fmt:message key="auditlog.entityName.title" /> </label>
				</div>

				<div class="col-md-3">
					<input value="<@jspEl 'query.entityName'/>" id="entityName"
						name="entityName" maxlength="50" class="" />
				</div>



			</div>

			<div class="row offset4">

				<div class="col-md-2">
					<label><fmt:message key="auditlog.createdDate.title" /> <fmt:message key="from.title" /></label>
				</div>

				<div class="col-md-3  input-group date  form_date" data-date-format="dd/mm/yyyy"">
					<form:input path="query.createdDateFrom" id="createdDateFrom" cssClass="form-control" readonly="true"/>
		<span class="input-group-addon"><span class="glyphicon glyphicon-remove"></span></span>
		<span class="input-group-addon"><span class="glyphicon glyphicon-calendar"></span></span>
		
				</div>
				
				<div class="col-md-2">
					<label><fmt:message key="auditlog.createdDate.title" /><fmt:message key="to.title" /> </label>
				</div>

				<div class="col-md-3 input-group date  form_date" data-date-format="dd/mm/yyyy">
					
					<form:input path="query.createdDateTo" id="createdDateTo" cssClass="form-control" readonly="true"/>
					<span class="input-group-addon"><span class="glyphicon glyphicon-remove"></span></span>
					<span class="input-group-addon"><span class="glyphicon glyphicon-calendar"></span></span>
		
				</div>

			</div>

		</div>
	</fieldset>
	<div class="handleControl">
		<input type="submit" class="btn btn-primary" style="width: 80px"
			value="<fmt:message key="navigation.button.query"/>"
			onclick="getReferenceForm(this).action='<@jspEl 'ctx'/>/auditlog/list'" />
		
		<div></div>

		<div class="gridTable">
			<div class="TableRecords_Wrapper">
				<div class="Filters_Wrapper">
				<c:if test="<@jspEl 'page.lastPageNumber > 1'/>">
				<div class=" pull-right">
				<ul id="pagination"></ul>
				</div>
				</c:if>
				
				<input type="hidden" name="sortColumns" value="<@jspEl 'query.sortColumns'/>" />
				<input type="hidden" name="pageNumber" value="<@jspEl 'query.pageNumber'/>" />

					<table width="100%" border="0" cellspacing="0"
						class="table table-bordered table-striped table-condensed table-collapsible">
						<thead>

							<tr>
								<th style="width: 1px;" class="TableRecords_Header"></th>
							

								<!-- 排序时为th增加sortColumn即可,new SimpleTable('sortColumns')会为tableHeader自动增加排序功能; -->
								<th sortColumn="Action" class="TableRecords_Header"><fmt:message
										key="auditlog.action.title" /></th>
								<th sortColumn="Entityname" class="TableRecords_Header"><fmt:message
										key="auditlog.entityName.title" /></th>
								<th sortColumn="Created_Date" class="TableRecords_Header"><fmt:message
										key="auditlog.createdDate.title" /></th>
								<th sortColumn="Detail" class="TableRecords_Header"><fmt:message
										key="auditlog.detail.title" /></th>

								<th class="TableRecords_Header">操作</th>
							</tr>

						</thead>
						<tbody>
							<c:forEach items="<@jspEl 'page.result'/>" var="item" varStatus="status">

								<tr
									class="<@jspEl "status.count % 2 == 0 ? 'TableRecords_OddLine' : 'TableRecords_EvenLine'"/>">
									<td><@jspEl 'page.thisPageFirstElementNumber + status.index'/></td>
									

									<td><c:out value='<@jspEl 'item.action'/>' />&nbsp;</td>
									<td><c:out value='<@jspEl 'item.entityName'/>' />&nbsp;</td>
									<td><c:out value='<@jspEl 'item.createdDate'/>' />&nbsp;</td>
									<td><c:out value='<@jspEl 'item.detail'/>' />&nbsp;</td>
									<td><a href="<@jspEl 'ctx'/>/auditlog/show?id=<@jspEl 'item.auditLogId'/>&"
										class="btn btn-info">查看</a>&nbsp;&nbsp;&nbsp;</td>
								</tr>

							</c:forEach>
						</tbody>
					</table>
				<c:if test="<@jspEl 'page.lastPageNumber > 1'/>">
				<div class=" pull-right">
				<ul id="pagination"></ul>
				</div>
				</c:if>
				</div>
			</div>
		</div>
</form>


<%@ include file="base.jsp"%>

